<?php

namespace App\Http\Controllers\Api\V1;

use App\Models\Category;
use App\Http\Controllers\Api\V1\Resources\CategoryResource;

class CategoriesController extends Controller
{
    public function index()
    {
    	$categories = Category::query()->where('is_show',true)->orderBy('order')->get();

        return CategoryResource::collection($categories);
    	//return response()->json($categories);
    }
}
